This program is Freeware, and the THINK Pascal source code for version 2.0.0 is available from various FTP sites.
Try StuffIt Expander from Aladdin as an alternative to this program.
• Contents
What DeHQX Does
Definitions
Using DeHQX
Features
Preferences
How It Works
Limitations
Small Print
Warranty
Fine Print
Version History
Acknowledgements
The Author
• What DeHQX Does
DeHQX restores files that have been hqxed by a BinHex 4.0 compatible program. The BinHex format stores Macintosh files (including some Finder information as well as the data and resource forks) in a text-only form that can be transmitted between computers without fear of lost bits (especially the high bits).
• Definitions
Output file: a file decoded from BinHex format that is created by DeHQX.
HQX Source: the BinHex representation of one output file.
Source file: a file containing (parts of) one or more HQX sources.
DeHQX: a noun, the program described in this documentation.
Dehqx: a verb meaning to restore a file stored in BinHex format. Hence dehqxing. (I pronounce dehqx as if it was spelt dee-hecks.)
• Using DeHQX
- Launch DeHQX from the Finder.
- Set the options via the Preferences item of the File menu.
- Choose DeHQX… from the File menu.
- Select a file or folder.
- If prompted, select an output file name and folder.
- If an error is detected, you may choose whether to delete the file that was being created, as well as whether to continue dehqxing files. Note: The file being created will almost certainly be useless, and choosing a continue option will not continue with this file, only with other files in the folder (or other hqx sources in the same source file).
• Features
- Dehqxes individual files or entire folders.
- Source files may contain multiple separate HQX sources.
- Source files may contain any NEWS or MAIL headers.
- HQX sources may contain part separators (ie, "--- end of part 1").
- HQX parts may be split across multiple (alphabetical) files.
- Optionally dehqxes a pre-specified folder on startup.
- Optionally produces a folder for the output files.
- Optionally prompts for the output file only if it already exists, or automatically creates a unique name, skips the file, or overwrites the file.
- Dehqx Any files, TEXT files, or TEXT files that end in "hqx".
- Optionally delete the source file (if there are no errors).
- Optionally beep or flash the apple/application menu on completion.
- Calculates and verifies the checksums (CRC).
- MultiFinder and System 7 friendly.
- Works well in the background.
- Almost totally non-modal.
• Preferences
When DeHQX is launched, it checks the Preferences folder in the System Folder for the DeHQX Preferences document. If it finds the document, it reads the preferences from there. You can change the settings by choosing Preferences from the File menu. If you click the OK button, changes you make will be temporary, while clicking the Save button makes the changes permanent. You can set the following options:
Prompt For File Name:
Always - Always prompt for the output name.
If destination exists - Prompt only if the output file already exists.
Skip - If destination exists, skip the file.
Overwrite file - Always overwrite the output file.
Create unique name - Generate a unique name if the file already exists.
Create DeHQXeD Folder:
Always - Always create a folder for the output files.
If dehqxing a folder - Create DeHQXeD folder if you are dehqxing a folder.
Never - Never create a new folder.
Display:
All Files - All files will be displayed in the DeHQX… dialog box.
TEXT Files - All TEXT files will be displayed.
.hqx TEXT Files - Only TEXT files ending in "hqx" will be displayed.
The files that are displayed will be dehqxed if the folder button is clicked. It doesn't really matter if there are non HQX files in the list, since they will not contain the required "(This file must be …", so no output file will be generated, and the file will not be deleted even if the delete option is selected (theoretically anyway. Personally, I wouldn't try this on the only copy of my honours thesis! :-).
Handle Parts - Remove section parts (see How It Works).
Demand '(This file…' - Require this string to start the dehqxing. Otherwise dehqx will allow dehqxing to start after a 64 character line starting with a colon and containing valid hqx characters.
On startup:
Prompt for files - Display the DeHQX… dialog box when DeHQX starts up.
Dehqx folder: - Dehqx the specified folder when DeHQX starts.
Click the button to set the folder, the checkbox to enable/disable it.
If you hold option down on startup, the folder will be ignored.
On completion:
Delete Source - Delete the source file after dehqxing.
Beep - DeHQX beeps when it finishes dehqxing.
Flash Apple - Flash the Apple/Application menu when finished dehqxing.
Quit - Quit DeHQX when finished dehqxing.
• How It Works
DeHQX scans the source file selected (or all the displayed files in the folder selected) for the string "(This file must be converted with BinHex 4.0)" (if Demand 'This file…' is not checked, DeHQX will also allow a hqx file to start with a 64 character line starting with a colon and containing only valid hqx characters). The next character must be a colon (:). DeHQX then begins dehqxing the file. If it encounters a line beginning with "--- end of part", it ignores the file until it encounters a line consisting only of "---", at which time it resumes dehqxing. When it comes to the end of the HQX source, if checks for the terminating colon, and then continues scanning the file for the next "(This file…"
So each source file may contain multiple HQX sources, each of which may
be segmented into parts.
After DeHQX has finished, it will delete the source files if
- the Delete Source File option is selected.
- no errors were encountered in the source file.
- at least some (around 60) hqx characters were read from the file.
• Limitations
DeHQX probably requires the 128k ROM and system version 6.0. It may well only work with a Mac Plus or Classic or IIsi, and System 7.0. It appears to work with MultiFinder, System 6.0.x, System 7.0, SE/30, IIci. It should require little memory.
DeHQX can dehqx a HQX source if it has been split into separate files as long as the parts are ordered alphabetically. If the parts are numbered, you must be careful that the 10th,11th,12th etc files do not come before the 2nd file (eg, BigFile-10.hqx comes before BigFile-2.hqx. Rename the latter to BigFile-02.hqx).
You may have problems if you use an anti-viral program such as Gatekeeper that prohibits the creation or modification of resource forks. DeHQX obviously needs to be able to create such resource forks, so you had better disable this protection if it causes any problems.
Thanks to Howard, DeHQX verifies the checksum stored in the HQX sources. If the checksum is bad, you'll get an unpleasant message about invalid HQX formats.
• Small Print
This Program is Freeware. You may distribute it any way you wish as long as you don't charge for it. It would probably be a good idea to keep this documentation file with the program (but I'm hardly likely to check up on you now am I!). Remember, with Freeware you may be getting what you paid for! (I don't guarantee any support, but I always answer my Email (snail-mail with bits of paper and such I'm not so good with!))
If you use this program, send me a note! Curiously, over 600 people downloaded DeHQX v1.0.5, yet only a couple dozen people sent me Email! Thank heavens I didn't make it Shareware! :-)
• Warranty
There is absolutely NO warranty, guarantee, hint, suggestion or anything else that would lead anyone to think that DeHQX does anything stated in this documentation. It usually does not destroy data (systems, hardware, etc), and has sometimes worked on my Mac Plus with System 7.0. It is highly unlikely that it will work with older systems (pre 6.0 anyway) or with the 64k ROM. It might work with the SE models and the II models, but I don't have one, so I don't know. (Anyone want to give me a IIfx so I can check for compatibility?) If it works on your system (or especially if it doesn't!), send me a postcard or some Email and let me know!
• Fine Print
Peter Lewis hereby disclaims all warranties relating to this software, whether express or implied, including without limitation any implied warranties of merchantability or fitness for a particular purpose. Does any one really read this stuff. Peter Lewis will not be liable for any special, incidental, consequential, indirect or similar damages due to loss of data or any other reason, even if Peter Lewis or an agent of his has been advised of the possibility of such damages. In no event shall Peter Lewis be liable for any damages, regardless of the form of the claim. The person using the software bears all risk as to the quality and performance of the software.
• Version History
Still to do:
Save window rects
Accumulate Header info into a file - Bob Boonstra
Put source and output files into folders?
Add EnHQX ability? - Bill Johnston (HeidiTools)
Unattended operation? - Dan Wismer
SYSTEM 7 STUFF:
Call StuffIt/Compactor etc to unstuff files - Allan Burton
2.0.1 - Release 3
~Fixed compatibility with AppleScript
2.0.0 - Release 2
1.1.5d - Final Beta Release
~Fix crash due to missing "otherwise" in a case statement.
1.14d - Minor Beta Release
Allow start without the (This file...)
If the user cancels, stop.
Put file name in error alerts
Always delete the trashed output files
Didn't always display the Creator name instead of signiture
Ensure it dehqxes the folder immediately, not after an event
Disable drop folder if files are droped onto DeHQX
Actually use the Drop Folder check box!
Policy for … in menus.
All menus that which requires more information in order to
complete or simply displays information have …
1.1.3d - Beta Release
Crash with half a .hqx file? - Craig
Drop Folder that gets checked on startup
Simplify Prefs (Loose Load/Save Prefs, put Save,OK,Cancel in Dialog box)
- Bill Johnston
Colour Icons - Allan Burton (ARGH! Need a mac with 256 colours! }
{ ARGHH! ARRGHH! 8-bit ICONs take up 1k! }
Can't drag multiple files to DeHQX
Moral: Don't dispose of the list until you have read ALL the items! :-)
Cancel button
Use GetGrayRgn^^.RgnBBox for dragging windows - Mike Dickens
SYSTEM 7 STUFF:
Put Help menu item in the Balloon Help Menu
1.1.1d - Beta Release
Move Name/Type/Creator/Data/Resource closer together
Init cursor somewhere - on Resume perhaps! - John Gee
Dim About/Help when window is at front
cmd-. Fails AGAIN! - Neale
Fix menus, add Close and handle it
Fix CHK Error with some multipart files - Neale
Tricky. It thought the second --- in "--- end of part 1 ---" was the start!
Delete, Quit, Beep - doesn't beep before quiting. - John Gee
Tripple-click with Auto DeHQX on, hangs with file box - John Gee
Disabled auto dehqx if DeHQX isn't in the foreground at the right time
SYSTEM 7 STUFF:
Replace Creator with Creator Name
1.1.0d - Beta Release
No command-A About key - Les Ferch?
Default to TEXT - Les Ferch?
Quit when Finished Option - Darko
Folder Button in Save As dialog - ?
Just use 1k,2k,3k,4k,5k,… instead of 1024,2048,3072,4k,… - Bill Johnston?
Track Modifications of Prefs file
Command-. doesnt work - Les Ferch
Use Notification Manager instead of beep (when I figure out how!)
- Neale Hays
Fix it so that Delete on Completion works fully
* better check if it works!
- Chris Webster & Bill Johnston
Put strings in resource fork
Speed Up! - Les Felch et al
* could be more, but it could always be faster!
Fix versions to use ParamText
Move folder button in SF dialog boxes? - nope, inconsistent with SFPutFile.
Make About & Help windows movable and non-modal
Add global progress bar
Allow DeHQX… menu item even while dehqxing
SYSTEM 7 STUFF:
Add small icons
Add FREF's for fold,disk (and keep TEXT)
Resolve alias file reference on prefs file
Use Sys7 Prefs folder - Check for Gestault gestaltFindFolderPresent
Support Apple Events (when I figure out how!) - Bill Johnston
1.0.5, Mar 1991 - Release 5. Display "Press command-. to Cancel" in DeHQX window. Allow files to be split anywhere. Fixed DeHQX so that ALL version numbers are the same. Changed option selection from a menu to a dialog box.Changed DeHQX window from a dialog box to a document window. Split files without parts. Become much more MultiFinder friendly (DeHQX in background, movable window, etc).
1.04, Jan 1991 - Beta Release 4. Allow spaces in the hqx sources. Disable the "DeHQX at Startup" option if DeHQX was started by double-clicking hqx documents. Added mstr=103 so multifinder will launch DeHQX when its documents are double-clicked.
1.03b, Dec 1990 - Beta Release 3. Calculates and verifies CRCs. Added options to generate a unique output name, and to automatically open the DeHQX… dialog box on startup.
1.02b, Dec 1990 - Beta release 2. Saveable preferences. Handles HQX parts separated over multiple files. Quit now leaves the File menu highlighted. Handles launching DeHQX documents (set the creator of the file to 'PnLh'). Improved the About and Help dialog boxes (yes, they were actually worse than they are now!).
1.01b, Oct 1990 - Beta release to six testers scattered across Australia and New Zealand.
Thanks to Neale Hays,Bill Johnston,Les Ferch,Darko,Chris Webster,Bob Boonstra, and others for some of these suggestions.
• Acknowledgements
Thanks go to the Howard, Paul, Allan, Tony, Chris, Martin, DRJQ, the UCC, Curtin, Todd, Steve, Neale, Bill, Les, Chris, Bob, c.s.m.p, ditmela.oz.au (& Harold), (ftp.)apple.com, Stephen, and anyone who uses DeHQX!
FetchNews 1.0.0b - Fetch News for use with NewsWatcher’s demo mode.
MacTCP Watcher 1.1.0 - Display MacTCP’s state information.
Bolo Finder 1.0.2 - Display the results from Mike Ellis' Bolo Tracker.
Bolo RandomMap 1.1.0 - Generate a random map for Bolo.
You can get the latest development versions from redback.cs.uwa.edu.au, but please use the major archives for released version if at all possible. Redback is a long long way from most people, and using it wastes bandwidth on the Australian-US satelite link which is overly congested already. So use the versions posted to the archives (like sumex-aim.stanford.edu or mac.archive.umich.edu), and only use the development versions if you have some specific problem - in which case tell me!)
Send postcards, comments, bug reports, wishes, and payments to: